import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/admin/login/login',
    method: 'post',
    data
  })
}


export function register(data) {
  return request({
    url: '/admin/admin/index/register',
    method: 'post',
    data
  })
}


export function verify(data) {
  return request({
    url: '/admin/login/getVerifyCode',
    method: 'post',
    data
  })
}


export function sendRegisterCode(data) {
  return request({
    url: '/admin/admin/index/sendRegisterCode',
    method: 'post',
    data
  })
}


export function getUserInfo(data) {
  return request({
    url: '/admin/user/getUserInfo',
    method: 'post',
    data
  })
}


export function setUserInfo(data) {
  return request({
    url: '/admin/user/setUserInfo',
    method: 'post',
    data
  })
}

export function updatePwd(data) {
  return request({
    url: '/admin/user/updatePwd',
    method: 'post',
    data
  })
}


export function getInfo(data) {
  return request({
    url: '/admin/admin/user/getInfo',
    method: 'post',
    data
  })
}

export function logout() {
  return request({
    url: '/admin/login/logout',
    method: 'post'
  })
}




export function getApiMsg(data) {
  return request({
    url: '/admin/admin/user/getApiMsg',
    method: 'post',
    data
  })
}


export function setApiMsg(data) {
  return request({
    url: '/admin/admin/user/setApiMsg',
    method: 'post',
    data
  })
}



/**
 * 用户等级
 * @param {*} data 
 */
export function getUserLevelCategory(data) {
  return request({
    url: '/admin/admin/userLevel/getCategory',
    method: 'post',
    data
  })
}